import { LayoutIndex } from "./constant"
import React from "react"
import lazyLoad from "./utils/lazyLoad"

export const commonRouterList = [
    {
        element: <LayoutIndex />,
        children: [
            {
                path:"/home/index",
                element: <div>index</div>,
                meta: {
                    reqiureAuth: true,
                    title: "首页",
                    key: "home",
                    icon:'HomeOutlined'
                }
            }
        ]
    },
    {
        element: <LayoutIndex />,
        path:'/ant',
        meta:{
            title:'ant Design组件试用',
            icon:'DatabaseOutlined'
        },
        children: [
            {
                path:"/ant/index",
                element: lazyLoad(React.lazy(() => import("@/views/antd"))),
                meta: {
                    reqiureAuth: true,
                    title: "Ant首页",
                    key: "antHome",
                    icon:"AppstoreOutlined"
                }
            },
            {
                path:"/ant/iframe",
                element: lazyLoad(React.lazy(() => import("@/views/antd/iframe"))),
                meta: {
                    reqiureAuth: true,
                    title: "Ant官网",
                    key: "antWeb",
                    icon:"AppstoreOutlined"
                } 
            }
        ]
    },
    {
        element: <LayoutIndex />,
        path:'/hook',
        meta:{
            title:'试一下自定义Hook',
            icon:'ShareAltOutlined'
        },
        children: [
            {
                path:"/hook/hookButton",
                element: lazyLoad(React.lazy(() => import("@/views/hook/hookButton"))),
                meta: {
                    reqiureAuth: true,
                    title: "按钮权限",
                    key: "useHooks",
                    icon:"AppstoreOutlined"
                }
            }
        ]
    },
    {
        element: <LayoutIndex />,
        path:'/echarts',
        meta:{
            title:'Echarts测试',
            icon:'AreaChartOutlined'
        },
        children: [
            {
                path:"/echarts/init",
                element: lazyLoad(React.lazy(() => import("@/views/echarts/init"))),
                meta: {
                    reqiureAuth: true,
                    title: "初始化一下试试",
                    key: "initEcharts",
                    icon:"AppstoreOutlined"
                }
            }
        ]
    },
    {
        element: <LayoutIndex />,
        path:'/funny',
        meta:{
            title:'第三方库测试',
            icon:'CloudServerOutlined'
        },
        children: [
            {
                path:"/funny/step",
                element: lazyLoad(React.lazy(() => import("@/views/funny/step"))),
                meta: {
                    reqiureAuth: true,
                    title: "引导",
                    key: "step",
                    icon:"AppstoreOutlined"
                }
            },
            {
                path:"/funny/acceler",
                element: lazyLoad(React.lazy(() => import("@/views/funny/acceleratorKunn"))),
                meta: {
                    reqiureAuth: true,
                    title: "一方通行",
                    key: "acceler",
                    icon:"AppstoreOutlined"
                }
            },
            {
                path:"/funny/threejs",
                element: lazyLoad(React.lazy(() => import("@/views/funny/threejs"))),
                meta: {
                    reqiureAuth: true,
                    title: "threejs",
                    key: "threejs",
                    icon:"AppstoreOutlined"
                }
            }
        ]
    },
    {
        element: <LayoutIndex />,
        path:'/map',
        meta:{
            title:'地图',
            icon:'CloudServerOutlined'
        },
        children: [
            {
                path:"/map/amap",
                element: lazyLoad(React.lazy(() => import("@/views/map/AMap/AMap"))),
                meta: {
                    reqiureAuth: true,
                    title: "高德地图",
                    key: "amap",
                    icon:"AppstoreOutlined"
                }
            }
        ]
    }
]